package acm;

import java.util.Scanner;

public class a9 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int x,z,xb=-1;
        x=in.nextInt();
        int[] y = new int[x];
        for (int i=0;i<y.length;i++){
            y[i] = in.nextInt();
        }
        z=in.nextInt();
        for (int j=0;j<y.length;j++){
            if (y[j]==z){
                xb=j+1;
                break;
            }
        }
        System.out.print(xb);
    }
}
